<script>
    let username;
    let mobile;
    function submit() {
        alert(username + " " + mobile);
    }
</script>

<style lang="less">
    .layout {
        display: flex;
        align-items: center;
        flex-direction: column;
        width: 100%;
        overflow: hidden;
        background: #eee;
        .banner img {
            width: 100%;
        }
        .name,.mobile{
            display: block;
            width: 300px;
            height: 25px;
            margin: 5px 0;
        }
    }
</style>

<!-- 这块内容会插入到html的head中 -->
<svelte:head>
    <title>首页</title>
</svelte:head>

<div>
    <div class="layout">
        <div class="banner"><img src="/successkid.jpg" alt="" /></div>
        <div class="form">
            <div class="form-box">
                <input
                    type="text"
                    placeholder="姓名"
                    class="name"
                    bind:value={username} />
                <input
                    type="mobile"
                    placeholder="手机号"
                    class="mobile"
                    bind:value={mobile} />
            </div>
            <button on:click={submit}>提交</button>
        </div>
        <div class="footer" />
    </div>
</div>
